const COLOR_MAP = [
  '#ef9a9a',
  '#f48fb1',
  '#ce93d8',
  '#b39ddb',
  '#9fa8da',
  '#90caf9',
  '#81d4fa',
  '#80deea',
  '#80cbc4',
  '#a5d6a7',
  '#c5e1a5',
  '#ffe082',
  '#ffcc80',
  '#ffab91',
  '#bcaaa4',
  '#b0bec5',
]

// text-white
export function useRandomColor() {
  return (val: string) => {
    const i = val?.slice(-1).charCodeAt(0) % COLOR_MAP.length
    return COLOR_MAP[i]
  }
}
